<template>
	<view class="sec-body">
		<view class="field-title">
			<text class="legend">查询条件</text>
			<view class="field-wrap">
				<form class="uni-form" @submit="submitForm">
					<view class="uni-form-item uni-column">
						<label class="title"><text style="color:red;padding-right:10upx;">⁎</text> 身份证号</label>
						<input  class="uni-input my-picker"  type="idcard" v-model="AAC002"/>
					</view>
					<view class="uni-form-item uni-column">
						<label class="title"><text style="color:red;padding-right:10upx;">⁎</text> 社保卡号</label>
						<input  class="uni-input my-picker"  type="idcard" v-model="AAZ500"/>
					</view>
				
					<button type="primary"  form-type="submit" style="margin-top: 30upx;width: 100%;">查询</button>
				</form>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				AAC002:'',				//身份证号
				AAZ500:'',				//社保卡号
				pageIndex:1,			//当前页码
				totalpage:1,			//总页码
				toastJson:{
					AAC002:'请填写身份证号',
					AAZ500:'请填写社保卡号'
				}
			}
		},
		methods: {
			submitForm(e){
				if(!this.AAC002||!this.AAZ500){
					uni.showToast({
						title:this.AAC002?this.toastJson['AAZ500']:this.toastJson['AAC002'],
						image:'../../static/image/warning.png'
					});
					return false;
				}
				if(this.AAC002&&this.AAZ500){
					// path?key=value&key2=value2
					uni.navigateTo({
						url:'../records/records?AAC002='+this.AAC002+'&AAZ500='+this.AAZ500,
						// url:'../test/test'
					})
				}
			}
		},
		onShow(){
			var userInfo = uni.getStorageSync("userInfo");
			this.AAC002 = userInfo.AAC002;				//身份证号
			this.AAZ500 = userInfo.AAZ500;				//社保卡号
			

		}
	}
</script>

<style>
.sec-body{
		padding: 60upx;
	}
	.field-title{
		border:2px groove #E4E7ED;
	}

	.field-wrap{
	  margin:40upx 32upx;
	}
	.title{
		width: 150upx;
	}
</style>
